home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
programming
/
other
/
gui4cli
/
dir
/
dir.lock
< prev
next >
Wrap
Text File
|
1999-04-29
|
2KB
|
64 lines
G4C
; This is a LOCK for your amiga.
; All it does is to put up a full screen borderless window, which will
; not close untill you give the correct pass code.
WINBIG 0 0 0 0 "" ; a window at 0,0, screen wide & high
WinType 000010 ; borderless window, with no gadgets
CTEXT 200 220 "Authorised Personel Only" times.font 24 2 0 0001
xONLOAD
lk_var = "" ; We clear the code variable
lk_flag = 0
GuiOpen #this ; and open the gui upon loading.
xOnOpen
setgad #this 1 ON
; We declare the following xONKEY events, so that we disable the standard
; window shortcuts (with which the lock could be bypassed).
xONKEY #3 ; Control C - Close window
xONKEY #2 ; Control B - Window to back
xONKEY #5 ; Control E - Edit window
xONKEY #10 ; Control J - Jump screen
xONKEY #18 ; Control R - Reload
xONKEY #14 ; Control N - Next Window
xONKEY #17 ; Control Q - Quit Window
xONKEY #23 ; Control W - Window size adjustment
xONKEY #26 ; Control Z - Zoom Window
xONKEY #19 ; Control S - Status
xONInactive
guiwindow #this FRONT
guiscreen #this FRONT
Text 200 60 240 14 "Input pass code wanted:" 100 NOBOX
gadid 2
xTextIn 200 75 240 18 "" lk_var "" 100
gadid 1
if $lk_flag = 0 ; First time - get pass code
lk_flag = 1
lk_code = $lk_var
update #this 2 "Input correct pass code:"
update #this 1 ""
setgad #this 1 ON
else
if $lk_var = $lk_code ; quit if correct.
GUIQUIT #this
else
update #this 2 "Wrong Code !!"
speak 'Wrong Code! Please do not use this computer!'
lk_var = "" ; Clear the variable for an other try.
update #this 1 ""
setgad #this 1 ON
endif
endif